2dd82675fb003bbceb2c8531245716e3ed26ac8f,src/main/java/org/elasticsearch/action/admin/indices/delete/TransportDeleteIndexAction.java,TransportDeleteIndexAction,doExecute,#DeleteIndexRequest#ActionListener#,86
Before Change
if (disableDeleteAllIndices && (request.indices() == null || request.indices().length == 0 || (request.indices().length == 1 && request.indices()[0].equals("_all")))) {
throw new ElasticSearchIllegalArgumentException("deleting all indices is disabled");
}
request.indices(clusterService.state().metaData().concreteIndices(request.indices()));
super.doExecute(request, listener);
}
After Change
@Override
protected void doExecute(DeleteIndexRequest request, ActionListener<DeleteIndexResponse> listener) {
ClusterState state = clusterService.state();
String[] indicesOrAliases = request.indices();
request.indices(state.metaData().concreteIndices(request.indices()));
if (disableDeleteAllIndices) {
// simple check on the original indices with "all" default parameter
if (indicesOrAliases == null || indicesOrAliases.length == 0 || (indicesOrAliases.length == 1 && indicesOrAliases[0].equals("_all"))) {
throw new ElasticSearchIllegalArgumentException("deleting all indices is disabled");
}
// if we end up matching on all indices, check, if its a wildcard parameter, or a "-something" structure